<%@ include file="/WEB-INF/jsp/header.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>


	<h1>Úvodní stránka</h1>
	
	<h2>Nové galerie</h2>
	
	<c:choose>
	  	<c:when test="${empty galleries}">
	  		<p>Nebyla nalezena žádná fotogalerie</p> 
	  	</c:when>
	  	<c:otherwise>
	  		<c:forEach var="gallery" items="${galleries}">
				<div class="snapshot">
					<h3><a href="<spring:url value="/gallery/show/${gallery.id}" />">${gallery.name}</a></h3>
					<span class="UserName">${gallery.owner.fullName}</span> <br />
					<img src="${pageContext.request.contextPath}/uploaded/${gallery.owner.userName}/${gallery.rootFolder}/thumbnails/${gallery.previewFileName}" width="150" />
				</div>
			</c:forEach>
	  	</c:otherwise>
	</c:choose>
	
	<div class="cleaner"></div>
	
	<h2>Nově registrovaní uživatelé</h2>
	
	<c:choose>
	  	<c:when test="${empty users}">
	  		<p>Není registrován žádný uživatel.</p>
	  	</c:when>
	  	<c:otherwise>
	  		<c:forEach var="user" items="${users}">
				<a href="${pageContext.request.contextPath}/user/show/${user.userName}">${user.userName}</a>
			</c:forEach>
	  	</c:otherwise>
	</c:choose>
	
	<%@ include file="/WEB-INF/jsp/footer.jsp" %>
